Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale-based calendar week format #10360

Open
wants to merge 2 commits into
base: content
Choose a base branch
from

Conversation

dreamscached
Copy link
Member

At the moment the calendar is hardcoded to use sunday-saturday week format, which is not used worldwide. I suggest to use calendar module which in turn uses user's locale to determine first day of week.

After some testing it seems that it's enough just to set DAY_NAMES appropriately and update a constant in _setupDayButtons for it to seemingly work absolutely the same with the different week format.

This PR only adds monday-sunday week format (e.g. used in all of the Europe, Russia, and many other countries); in case firstweekday returns neither 0 nor 6 the calendar remains sunday-saturday.

@dreamscached dreamscached force-pushed the feature/locale-based-calendar branch from c1966f2 to 9d0db6d Compare January 17, 2025 21:33
@dreamscached dreamscached force-pushed the feature/locale-based-calendar branch from 9d0db6d to efd7dfa Compare January 17, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant